package dcc.manager.base;

import java.awt.BorderLayout;

import javax.swing.JPanel;

public abstract class Manager {

	private JPanel workPanelHolder;
	protected JPanel workPanel;
	

	public Manager() {
		this.workPanel = new JPanel();
		workPanel.setLayout(new BorderLayout(0, 0));
	}

	public void show() {
		this.workPanelHolder.removeAll();
		this.workPanelHolder.add(workPanel, BorderLayout.CENTER);
		this.workPanelHolder.updateUI();
	}

	public void setWorkPanel(JPanel workPanelHolder) {
		this.workPanelHolder = workPanelHolder;
		show();
	}
}
